<?php

/**
 * Gallery Uninstaller
 *
 * @package Bd Gallery
 * @author Bebliuc George Cristian
 * @author Gianfranco Liporace
 * @copyright 2008-2010
 * @version 1.3
 * @access public
 * @license You are free to modify and redistribuite the code, but keep credits intact!
 *
 */

if(!defined("CMS_ROOT"))
{
	die("Invalid Action");
}

$PDO = Record::getConnection();

$settings = "DELETE FROM `".TABLE_PREFIX."plugin_settings` WHERE `plugin_id` = 'gallary'";
$PDO->exec($settings);
$sql1 = "DROP TABLE " .TABLE_PREFIX . "photos;";
$sql2 = "DROP TABLE " .TABLE_PREFIX . "categories;";
$PDO->exec($sql1);
$PDO->exec($sql2);